import axios from '@/request.js'
import { queryParams } from "@/composables/util"



export function getorder(page,query){
    let r = queryParams(query)
    return axios.get(`/order?page=${page}${r}`);
  } 


export function del(id){
  return axios.post(`/order/delete/id/${id}`);
}

export function pdf(id){
  return axios.get(`/order/bill/id/${id}`);
}

export function over(id){
  return axios.get(`/order/over/id/${id}`);
}
//线下订单
export function create(data) {
  return axios.post("/order/create", data);
}

//日历
export function calendar() {
  // let r = queryParams(query);
  return axios.get(`/order/calendar`);
}

export function update(id,data) {
  return axios.post(`/order/update?id=${id}`,data);
}